<?php

/**
 * Historialpaquete form base class.
 *
 * @method Historialpaquete getObject() Returns the current form's model object
 *
 * @package    courier
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseHistorialpaqueteForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'hist_id'      => new sfWidgetFormInputHidden(),
      'hist_estado'  => new sfWidgetFormInputText(),
      'hist_fecha'   => new sfWidgetFormDate(),
      'hist_hora'    => new sfWidgetFormDate(),
      'hist_parada'  => new sfWidgetFormInputText(),
      'hist_paquete' => new sfWidgetFormPropelChoice(array('model' => 'Paquete', 'add_empty' => false)),
    ));

    $this->setValidators(array(
      'hist_id'      => new sfValidatorChoice(array('choices' => array($this->getObject()->getHistId()), 'empty_value' => $this->getObject()->getHistId(), 'required' => false)),
      'hist_estado'  => new sfValidatorString(array('max_length' => 50)),
      'hist_fecha'   => new sfValidatorDate(),
      'hist_hora'    => new sfValidatorDate(),
      'hist_parada'  => new sfValidatorString(array('max_length' => 200)),
      'hist_paquete' => new sfValidatorPropelChoice(array('model' => 'Paquete', 'column' => 'paq_id')),
    ));

    $this->widgetSchema->setNameFormat('historialpaquete[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Historialpaquete';
  }


}
